package com.example.administrator.yanfoxconn.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.example.administrator.yanfoxconn.R;
import com.example.administrator.yanfoxconn.constant.FoxContext;
import com.example.administrator.yanfoxconn.utils.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 多媒体 主界面
 * Created by song on 2021/7/29.
 */
public class KMDmtMenuActivity extends BaseActivity implements View.OnClickListener {

     private String type,title,name;//類別,標題


//    @BindView(R.id.btn_title_left)
//    Button btnBack;//返回
//    @BindView(R.id.tv_title)
//    TextView tvTittle;//標題

    @BindView(R.id.tv_id)
    TextView tvId;//用户账号
    @BindView(R.id.btn_book)
    Button btnBook;//预   约
    @BindView(R.id.btn_out)
    Button btnOut;//取   用
    @BindView(R.id.btn_return)
    Button btnReturn;//归   还
    @BindView(R.id.btn_check)
    Button btnCheck;//点检
    @BindView(R.id.btn_maintenance)
    Button btnMaintenance;//维修

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_km_dmt_main);
        ButterKnife.bind(this);

//        btnBack.setOnClickListener(this);
        btnBook.setOnClickListener(this);
        btnOut.setOnClickListener(this);
        btnReturn.setOnClickListener(this);
        btnCheck.setOnClickListener(this);
        btnMaintenance.setOnClickListener(this);
        type = FoxContext.getInstance().getType();
//        tvTittle.setText("title");
      tvId.setText(FoxContext.getInstance().getLoginId()+"--"+FoxContext.getInstance().getName());


    }
    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.btn_title_left://返回
                finish();
                break;
            case R.id.btn_book://预   约
                Intent resultIntent = new Intent(KMDmtMenuActivity.this, KMDmtTimeActivity.class);
                resultIntent.putExtra("title", "二維碼掃描");
                resultIntent.putExtra("num", "dq_check");
                resultIntent.putExtra("type", type);
                startActivity(resultIntent);
                break;
            case R.id.btn_out://取   用
                Intent resultIntent4 = new Intent(KMDmtMenuActivity.this, QrCodeActivity.class);
                resultIntent4.putExtra("title", "二維碼掃描");
                resultIntent4.putExtra("num","dmt_out");
                resultIntent4.putExtra("type", type);
                startActivity(resultIntent4);
                break;
            case R.id.btn_return://归   还
                Intent resultIntent3 = new Intent(KMDmtMenuActivity.this, QrCodeActivity.class);
                resultIntent3.putExtra("title", "二維碼掃描");
                resultIntent3.putExtra("num","dmt_return");
                resultIntent3.putExtra("type", type);
                startActivity(resultIntent3);
                break;
            case R.id.btn_check://点检
//                Intent resultIntent5 = new Intent(JQDmtMenuActivity.this, ZhiyinshuiMaintainListActivity.class);
//                resultIntent5.putExtra("type", type);
//                startActivity(resultIntent5);
                break;
            case R.id.btn_maintenance://维修
//                Intent resultIntent2 = new Intent(JQDmtMenuActivity.this, ZhiyinshuiExceDeviceListActivity.class);
//                resultIntent2.putExtra("type", type);
//                startActivity(resultIntent2);
                break;
        }
    }
}